package com.tmsb.utils;

import java.util.HashMap;

/**
 * Description: 用cityId获取省的名称
 * Version:1.0.0
 *
 * @author xiekb
 * @date 2020/7/1
 */
public class ProvinceCodeTrans {
    private static final HashMap<String,String> PROVINCE_MAP =new HashMap<String,String>(){{
        put("110000","110000_北京");
        put("120000","120000_天津");
        put("130000","130000_河北");
        put("140000","140000_山西");
        put("150000","150000_内蒙古");
        put("210000","210000_辽宁");
        put("220000","220000_吉林");
        put("230000","230000_黑龙江");
        put("310000","310000_上海");
        put("320000","320000_江苏");
        put("330000","330000_浙江");
        put("340000","340000_安徽");
        put("350000","350000_福建");
        put("360000","360000_江西");
        put("370000","370000_山东");
        put("410000","410000_河南");
        put("420000","420000_湖北");
        put("430000","430000_湖南");
        put("440000","440000_广东");
        put("450000","450000_广西");
        put("460000","460000_海南");
        put("510000","510000_四川");
        put("520000","520000_贵州");
        put("530000","530000_云南");
        put("540000","540000_西藏");
        put("500000","500000_重庆");
        put("610000","610000_陕西");
        put("620000","620000_甘肃");
        put("630000","630000_青海");
        put("640000","640000_宁夏");
        put("650000","650000_新疆");
        put("810000","810000_香港");
        put("820000","820000_澳门");
        put("830000","830000_台湾");
    }};

    public static String getProvinceKey(String cityId){
        String provinceCode = cityId.substring(0,2)+"0000";
        return PROVINCE_MAP.get(provinceCode);
    }



}
